Skip to content

Conversation

bhouston
Copy link
Member

Decouple Browser Session Tracking from backgroundTools

This PR implements the changes requested in issue #291 to decouple browser session tracking from the backgroundTools implementation.

Changes Made

  1. Created a dedicated BrowserTracker class in packages/agent/src/tools/browser/browserTracker.ts that is responsible for tracking browser sessions
  2. Implemented a new listBrowsers tool in packages/agent/src/tools/browser/listBrowsers.ts that provides similar functionality to listBackgroundTools but focused only on browser sessions
  3. Updated browseStart.ts and browseMessage.ts to use the new browserTracker instead of backgroundTools
  4. Modified backgroundTools.ts to remove browser-related code
  5. Ensured all tests pass

Benefits

  • Reduced coupling between different tool types
  • More focused and maintainable code
  • Easier to extend or modify browser-specific functionality
  • Clearer separation of concerns

Testing

All tests pass, confirming that the changes maintain backward compatibility while providing the desired decoupling.

Fixes #291

- Fixed type errors in browser tracker implementation

- Updated tests to remove browser-related code from backgroundTools tests

- Added default agent name for browser tracker tools
@bhouston
Copy link
Member Author

This has been merged via a different PR.

@bhouston bhouston closed this Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decouple Browser Session Tracking from backgroundTools
1 participant